<?php
	session_start();
	require_once('libraries/database.php');
	require_once('libraries/user.php');
    require_once('libraries/phim.php');
	$muser=new User;
	
	if(!isset($_SESSION['login']))
		header("location:admin_login.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Admin Manager </title>
    <link type="text/css" href="style/style.css" rel="stylesheet" />
    <link type="text/css" href="style/menu-tap.css" rel="stylesheet" />  
    <script src="includes/jquery.min.js" type="text/javascript"></script>
    <script language="javascript" src="includes/ckeditor/ckeditor.js" type="text/javascript"></script>
    <script language="javascript" src="includes/jquery-ui.js" type="text/javascript"></script>
    
    <!--script phần auto load ảnh sản phẩm-->
	<script type="text/javascript" src="includes/jquery.min.js"></script>
    <script type="text/javascript" src="includes/jquery.form.js"></script>
     <!-- menutap-->
    <script type="text/javascript" src="includes/jquery-ui.min.js"></script>
    <!--color-->
    <script type="text/javascript" src="includes/jscolor.js"></script>
     
    <script type="text/javascript" src="includes/themmoi_ajax.js"></script>
    <script type="text/javascript">
		$(document).ready(function() {
		   if( page==1 || page ==2 || page==3 || page==4 || page==5 || page==6 || page==7) 
		   {
			   $("'li:nth-child("+page+")'").addClass("active");
			}
		});
		$(document).ready(function() {
            if(document.getElementById("user_id").innerHTML!=1)
			{
				$("#pq_phanquyen").addClass("hidden");
				$("#gd_giaodien").addClass("hidden");
			}
        });
	</script>
    </head>
<body class="bgc">
    <div id="admin">
    	<div class="tab-st">Xin chào <a id="user"><?php echo $_SESSION['login']; ?></a><a id="user_id" style="display:none"><?php echo $_SESSION['level_id']?></a> | <a href="logout.php" id="logout">Đăng Xuất</a></div>
        <div id="wrap">
            <div id="head">
                <h1>
                    <a href="index.html">Admin Manager</a>
                </h1>
                <div id="tabsPanel">
                    <div id="a" class="tab_content">
                       <ol id="toc">
                            <li >
                            	<a href="admin_index.php">
                                	<img src="img/home.png" />
                                	<p>Trang Chủ</p>
                                </a>
                            </li>
                            <li >
                            	<a href="admin_themmoi.php">
                                	<img src="img/up1blue.png" />
                                	<p>Đăng Phim</p>
                                </a>
                            </li>
                            <li id="gd_autoadd">
                            	<a href="admin_auto_add.php">
                                	<img src="img/up.png" />
                                	<p>Đăng Phim Tự Động</p>
                                </a>
                            </li>
                            <li id="cm_chuyenmuc">
                            	<a href="admin_chuyenmuc.php">
                                	<img src="img/folder_desktop.png" />
                                	<p>chuyên mục</p>
                                </a>
                            </li>
                            <li id="pq_phanquyen">
                            	<a href="admin_phanquyen.php">
                                	<img src="img/user_group.png" />
                                	<p>phân quyền</p>
                                </a>
                            </li>
                            <li >
                            	<a href="admin_thongbao.php">
                                	<img src="img/mail_reply_all.png" />
                                	<p>Kiểm Tra Thư</p>
                                </a>
                            </li>
                            <li id="gd_giaodien">
                            	<a href="admin_giaodien.php">
                                	<img src="img/hp_monitor_dock.png" />
                                	<p>Giao Diện</p>
                                </a>
                            </li>
                        </ol>
                    </div>
        		</div>
                <img class="shadow" alt="shadow" src="img/shadow.png" />
            </div>
            <div id="content">
            	<div class="datalist">